WASHINGTON (AP) — For two weeks, Donald Trump has welcomed Elon Musk into his world. On Tuesday, it was Musk’s turn to play host to the president-elect.

Trump flew to South Texas to watch as Musk’s SpaceX launched a Starship rocket near the Mexican border. Trump listened intently as the world’s richest man explained how the test would work and demonstrated with a model. And then Trump squinted into the bright sky to watch liftoff.

It didn’t go perfectly -– the reuseable booster did not return to the launch pad as it had done on a previous test last month. Instead, the booster was directed to a splashdown in the Gulf of Mexico.

But Trump’s presence at the launch was a remarkable display of intimacy between the two men, one with implications for American politics, the government, foreign policy and even the possibility of humans reaching Mars.

Musk spent around $200 million to help Trump beat Democrat Kamala Harris in the presidential race, and he's been given unparalleled access. He's counseled Trump on nominees for the new administration, joined the president-elect's phone call with Ukrainian President Volodymyr Zelenskyy and been tapped to co-chair an advisory panel on cutting the size of the federal bureaucracy.

In addition to political influence, Musk could benefit personally as well. SpaceX, his rocket company, has billions of dollars in government contracts and the goal of eventually starting a colony on Mars. He's also CEO of Tesla, which manufactures electric vehicles, and has battled with regulators over safety concerns involving autonomous driving.

“Trump has the biggest possible regard for people who break the rules and get away with it," said William Galston, a senior fellow in governance studies at the Brookings Institution, a Washington-based think tank. "Musk has demonstrated extraordinary accomplishment in doing that.”

To top if off, Musk owns the social media company X, formally known as Twitter, which he has harnessed as an influential perch to promote Trump and his agenda.

“Stop the Swamp!” he wrote on Tuesday as he shared a warning that entrenched Washington interests are trying to undermine Trump before his inauguration.

Before the election, Musk rejected the idea that he was expecting any favors in return for supporting Trump in the presidential race.

"There is no quid pro quo," he posted on X in September. "With a Trump administration, we can execute major government reform, remove bureaucratic paperwork that is smothering the country and unlock a new age of prosperity."

However, Trump has not gone anywhere without Musk in the two weeks since beating Harris. Musk joined Trump at a meeting with House Republicans in Washington and sat next to him at an Ultimate Fighting Championship match in New York. The trip to Texas for the rocket launch was just Trump's third time outside Florida since the election.

Much of Trump's activity is happening with little public access for the press. Unlike his predecessors, he has opted against regularly making his travel plans or events open to journalists.

The relationship between Trump and Musk was not always so close.

Two years ago, Trump was mocking Musk in stump speeches and Musk was saying it was time for Trump to "hang up his hat & sail into the sunset."

"Trump would be 82 at end of term, which is too old to be chief executive of anything, let alone the United States of America," Musk wrote on social media.

But Musk swiftly endorsed Trump after the former president survived an assassination attempt in July. He quickly became a central figure in Trump’s orbit, appearing at times more like his running mate than Ohio Sen. JD Vance.

Trump started boasting about Musk's accomplishments at campaign rallies, such as when Starship's reusable rocket booster returned to the launch tower on a previous occasion and was caught by mechanical arms.

“Those arms grab it like you grab your baby, just like you grab your little baby. And it hugged it and just put it down, and there it was,” Trump said.

Musk was with Trump at his Mar-a-Lago resort on election night and has spent much of the two weeks since there. Trump’s granddaughter Kai Trump posted a photo of her with Musk at one of Trump’s golf resorts, writing that Musk was "achieving uncle status.”

Last week, Musk appeared in a golden ballroom at Mar-a-Lago, seated in the center of the room as a guest of honor at an event. Trump, in his remarks at the black tie event, said Musk’s IQ is “about as high as they can get” and praised him as “a really good guy.”

“He launched a rocket three weeks ago and then he went to Pennsylvania to campaign because he considered this more important than launching rockets that cost billions of dollars,” Trump said.

He joked about Musk’s constant presence at Mar-a-Lago, saying, “He likes this place. I can’t get him out of here."

He added, “And you know what, I like having him here.”

Musk said of the election results: “The public has given us a mandate that could not be more clear."

___

Price reported from New York.

President-elect Donald Trump greets Elon Musk before the launch of the sixth test flight of the SpaceX Starship rocket Tuesday, Nov. 19, 2024 in Brownsville, Texas. (Brandon Bell/Pool via AP)

Credit: AP

icon to expand image

Credit: AP

President-elect Donald Trump listens as Elon Musk explains the operations ahead of the launch of the sixth test flight of the SpaceX Starship rocket Tuesday, Nov. 19, 2024 in Brownsville, Texas. (Brandon Bell/Pool via AP)

Credit: AP

icon to expand image

Credit: AP

President-elect Donald Trump looks on with Elon Musk, right, at a UFC 309 mixed martial arts flyweight title bout, Saturday, Nov. 16, 2024, in New York. (AP Photo/Adam Hunger)

Credit: AP

icon to expand image

Credit: AP

Dana White, President-elect Donald Trump, Elon Musk and Kid Rock attend UFC 309 at Madison Square Garden, Saturday, Nov. 16, 2024, in New York. (AP Photo/Evan Vucci)

Credit: AP

icon to expand image

Credit: AP

President-elect Donald Trump poses for a photo with Dana White, Kid Rock and Elon Musk at UFC 309 at Madison Square Garden, Saturday, Nov. 16, 2024, in New York. (AP Photo/Evan Vucci)

Credit: AP

icon to expand image

Credit: AP

SpaceX's mega rocket Starship is prepared for an afternoon test flight from Starbase in Boca Chica, Texas, Tuesday, Nov. 19, 2024. (AP Photo/Eric Gay)

Credit: AP

icon to expand image

Credit: AP

President-elect Donald Trump listens as Elon Musk explains the operations ahead of the launch of the sixth test flight of the SpaceX Starship rocket Tuesday, Nov. 19, 2024 in Brownsville, Texas. (Brandon Bell/Pool via AP)

Credit: AP

icon to expand image

Credit: AP